package main

import (
	"github.com/mitchellh/cli"
	"my-go-cli/cases/token"
	"os"
)

func main() {
	c := cli.NewCLI("my-go-cli", "1.0.0")
	c.Args = os.Args[1:]
	c.Commands = map[string]cli.CommandFactory{
		"token-encode": token.EncodeCommandFactory,
		"token-decode": token.DecodeCommandFactory,
	}
	_, err := c.Run()
	if err != nil {
		println(err.Error())
	}
}
